#! /usr/bin/python

def fibonacci(n):
  sequence = []
  sequence.append(0)
  k=1
  i=0
  j=1
  while k<=n:
    sequence.append(k)
    k=j+i
    i=j
    j=k
  return sequence
    



def main():
  n=int(raw_input("Enter final term of sequence>> "))
  sequence = fibonacci(n)
  print sequence

if __name__ == '__main__':
  main()
